// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import App from "./App";
import router from "./router";
//全局引入element-ui
import "./plugins/element-ui";
//全局引入css
import "./assets/css/reset.css";
//全局引入fastclick.js
import FastClick from "fastclick";
FastClick.attach(document.body);
//全局引入字体图标
import "./assets/css/iconfont.css";
//全局引入轮播图
import VueAwesomeSwiper from "vue-awesome-swiper";
import "swiper/dist/css/swiper.css";
Vue.use(VueAwesomeSwiper);
//配置axios
import axios from "axios";
axios.defaults.baseURL = "http://127.0.0.1:8000";
Vue.prototype.$http = axios;

//vuex引入
import store from "./store";

// // 挂载请求头拦截器
// axios.interceptors.request.use(config => {
//   // console.log(config)
//   // 在请求头中新增一个authorization字段值为token值
//   config.headers.Authorization = window.sessionStorage.getItem("token");
//   return config;
// });

/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  store,
  components: { App },
  template: "<App/>"
});
